home *** CD-ROM | disk | FTP | other *** search
/ Apple Chronicle / Apple Chronicle (CDWM1023150)(Apple Computer)(1992).iso / Home / Home / stack_-1.xml < prev    next >
Extensible Markup Language  |  1992-08-27  |  14KB  |  30 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>9</cardCount>
  7.     <cardID>3916</cardID>
  8.     <listID>6325</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><true /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àûHome StackVersion 1.0¬©Copyright 1989,1990 by Apple Computer, Inc.All Rights ReservedTHE MESSAGE HANDLERS USED IN THIS SCRIPT:startUp,getHomeInfo,resume,createTheMenus,goHomeCards,helphyperTalk,nav,c,b,s,mw,vw,se,ss,xy,disallowInterruptionallowInterruption,setUserLevelFive,restoreUserLevel,searchScriptcheckForMissingFontsTHE FUNCTION HANDLERS USED IN THIS SCRIPT:homeMenuItems,homeMenuMsgs,lastHCItem,checkHCFontXCMD'S USED BY THIS SCRIPT:FontExists XFCNForm: FontExists(<font name>,<point size>)It returns true if the font/point size is installed or false if not.‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû-----  Startup/Resume Scripts:  --------------------------------------on startUp-- Requires handler: getHomeInfo,checkForMissingFonts-- gets and sets the user's preferencesgetHomeInfo-- checkForMissingFonts -- inform user of missing fontspass startUp -- so others can use itend startUpon getHomeInfo-- Needs: User preferences card of the home stack-- configures HyperCard to the user specified preferences-- The following 3 globals are used by HyperCard for locating-- stacks,applications, and documentsglobal Stacks,Applications,Documents,UserNameif short name of this stack is not "Home" then -- ‚àÜlock screenset lockRecent to trueset lockMessages to truepush this card -- remember where we arego home -- will take us to the home stack in case we're not thereput false into stackIsHomeelse put true into stackIsHomeput (cd fld "User Name" of cd "User Preferences") into UserNameset the userLevel to cd fld "User Level" of cd "User Preferences" -- hidden fieldset the powerKeys to hilite of cd btn id 3 of cd "User Preferences" -- Power Keysset the textArrows to hilite of cd btn id 2 of cd "User Preferences" -- Arrow keys in textset the blindTyping to hilite of cd btn id 1 of cd "User Preferences" -- Blind Typing-- load the search path globalsput bg fld "Paths" of cd "Stacks" into Stacksput bg fld "Paths" of cd "Applications" into Applicationsput bg fld "Paths" of cd "Documents" into Documentsif not stackIsHome thenpop card -- return to where we wereset lockRecent to false -- clean up for exitset lockMessages to falseunlock screenend ifend getHomeInfoon resume-- Requires handler: getHomeInfo-- gets and sets user preferences upon returninggetHomeInfopass resume -- so others can use itend resume-----  Menu Scripts:  ---------------------------------------------on createTheMenus resuming-- Requires function handlers: homeMenuItems,homeMenuMsgs-- creates the "Home" menu - called from the bkgnds of this stackif resuming is "true" and "Home" is in the menusthen delete menu "Home" -- ‚àÜ not our home menuif "Home" is in the menus then exit createTheMenus -- ‚àÜshow menuBar -- needed by the "Home" menucreate menu "Home" -- ‚àÜput homeMenuItems() into menu "Home" with menuMsgs homeMenuMsgs() -- ‚àÜend createTheMenusfunction homeMenuItems -- ‚àÜreturn "New Link to Stack...,New Link to Application...," & ¬¨"New Link to Document...,-,Rename This Card...,Reorder Cards...," & ¬¨"-,Home Cards,Preferences,Search Paths"end homeMenuItemsfunction homeMenuMsgsreturn "NewLink stack,NewLink application,NewLink document,empty," & ¬¨"RenameCard,ReorderCards,empty,goHomeCards,go card" && quote & "User Preferences" & ¬¨quote & ",go card" && quote & "Stacks" & quoteend homeMenuMsgson goHomeCardsglobal WhichHomeCardif WhichHomeCard is emptythen put (short name of first card) into WhichHomeCardgo card WhichHomeCard-- couldn't find requested cardif the result is not empty then go first card of bg "Home Cards"end goHomeCards-----  Help Scripts:  ------------------------------------------------on help theTopic-- ‚àÜ Note: typing "help <topic>" into msg box will locate-- the <topic> in "HyperCard Help"put "HyperCard Help" into theStackif ":" & theStack & return is in the stacks thenif the longWindowTitlesthen show window line (the number of lines of char 1 to offset(":" & theStack & return, the stacks) of the stacks) of the stackselse show window theStackelsego to stack theStack in a new window -- try in a new windowif the result = "Cancel" then exit to hyperCardelse if the result ‚↠empty then go to stack theStackend ifif the result is empty then findInTitle theTopic -- in the help stackend helpon hyperTalk theTopic-- ‚àÜ Note: typing "hyperTalk <topic>" into msg box will locate-- the <topic> in "HyperTalk Reference"put "HyperTalk Reference" into theStackif ":" & theStack & return is in the stacks thenif the longWindowTitlesthen show window line (the number of lines of char 1 to offset(":" & theStack & return, the stacks) of the stacks) of the stackselse show window theStackelsego to stack theStack in a new window -- try in a new windowif the result = "Cancel" then exit to hyperCardelse if the result ‚↠empty then go to stack theStackend ifif the result is empty then findInTitle theTopic -- in the help stackend hyperTalk-----  Utility Scripts:  ---------------------------------------------on nav-- Requires XCMD: palette "Navigator"palette "Navigator" -- ‚àÜ type "nav" into message boxend navon c-- Requires handlers: setUserLevelFive,restoreUserLevelput the tool into saveToolchoose browse toolsetUserLevelFive -- so the menu item will be theredoMenu "Card Info..." -- ‚àÜ type "c" into message boxrestoreUserLevelchoose saveToolend con b-- Requires handlers: setUserLevelFive,restoreUserLevelput the tool into saveToolchoose browse toolsetUserLevelFive -- so the menu item will be theredoMenu "Bkgnd Info..." -- ‚àÜ type "b" into message boxrestoreUserLevelchoose saveToolend bon s-- Requires handlers: setUserLevelFive,restoreUserLevelput the tool into saveToolchoose browse toolsetUserLevelFive -- so the menu item will be theredoMenu "Stack Info..." -- ‚àÜ type "s" into message boxrestoreUserLevelchoose saveToolend son mw-- Requires XWindow: Message Watchershow window "Message Watcher" -- ‚àÜ type "mw" into message boxend mwon vw-- Requires XWindow: Variable Watchershow window "Variable Watcher" -- ‚àÜ type "vw" into message boxend vwon se-- Requires XWindow: Script Editorask "Set script editor font type to:" with "Monaco" -- ‚àÜ default valueif the result is "Cancel" or it is empty then exit seset scriptTextFont to itask "Set script editor font size to:" with "9" -- ‚àÜ default valueif the result is "Cancel" or it is empty then exit seset scriptTextSize to itend seon ss pattern,stackName-- Requires handler: searchScriptsearchScript pattern,stackName -- ‚àÜ type "ss" into message boxend sson xy-- ‚àÜ type "xy" into message box to obtain mouse coordinatesset cursor to crossrepeat until the mouseClickput the mouseLoc && "  horz:" & the mouseH && "  vert:" & the mouseVend repeatend xyon disallowInterruption -- so can't stop scripts while runningset cantAbort of this stack to trueend disallowInterruptionon allowInterruption -- so can stop scripts while runningset cantAbort of this stack to falseend allowInterruptionon setUserLevelFive -- some things need this userLevelglobal SvLvlput the userLevel into SvLvlset the userLevel to 5end setUserLevelFiveon restoreUserLevel -- use after setUserLevelFiveglobal SvLvlif SvLvl is a number then set the userLevel to SvLvlend restoreUserLevelon searchScript pattern,stackName-- Requires handlers: setUserLevelFive,restoreUserLevel-- search ALL scripts of a stack for a 'pattern' of charactersglobal ScriptFindString -- HyperTalk global variableset lockRecent to truesetUserLevelFive -- saves current level and sets level 5push card -- remember where we areif pattern is empty thenask "Search for what string?" with ScriptFindString -- ‚àÜif (it is empty) or (the result is "Cancel") then exit searchScriptput it into pattern -- otherwise use it as the search patternend if-- put in HyperTalk global so just CMD-F in editor for easy findput pattern into ScriptFindStringset lockMessages to true -- avoid open messagesif stackName is not empty then go to stack stackName-- Note: if stackName is empty then we search the current stackset cursor to busy-- search the stack script of the stackif the script of this stack contains patternthen edit script of this stack-- search the background scripts and objects of the stackrepeat with curBkgnd = 1 to the number of bkgndsset cursor to busygo to card 1 of bkgnd curBkgndif the script of this bkgnd contains patternthen edit script of bkgnd curBkgndrepeat with curBgBtn = 1 to the number of bkgnd buttonsset cursor to busyif the script of bkgnd button curBgBtn contains patternthen edit script of bkgnd button curBgBtnend repeatrepeat with curBgField = 1 to the number of bkgnd fieldsset cursor to busyif the script of bkgnd field curBgField contains patternthen edit script of bkgnd field curBgFieldend repeatend repeat-- search the card scripts and objects of the stackrepeat with curCard = 1 to the number of cardsset cursor to busygo card curCardif the script of this card contains patternthen edit script of this cardrepeat with curCdBtn = 1 to the number of card buttonsset cursor to busyif the script of card button curCdBtn contains patternthen edit script of card button curCdBtnend repeatrepeat with curCdFld = 1 to the number of card fieldsset cursor to busyif the script of card field curCdFld contains patternthen edit script of card field curCdFldend repeatend repeatpop card -- return to where we wereset lockMessages to falseset lockRecent to falserestoreUserLevel -- set userLevel back to whatever it wasanswer "Search script done!" -- ‚àÜend searchScriptfunction lastHCItem delim,theText-- returns the portion of <theText> that follows the last <delim>if delim is in theText thenput lastHCItem(delim,char offset(delim,theText) + 1 to ¬¨length(theText) of theText) into theTextend ifreturn theTextend lastHCItem-----  NewLink Handler  ---------------------------------------------on newLink theTypeif short name of this stack = "Home" -- ‚àÜthen send "newLink" && theType to bkgnd id 2717end newLink-----  Font Adjustment Scripts:  ----------------------------------function checkHCFont theFont,pointSizes-- Requires XFCN: FontExists-- returns a list of font sizes needed but not in the systemput empty into missing-- steps through each point size passed inrepeat with count = 1 to the number of items in pointSizesput item count of pointSizes into theCurrentPtSizeif not FontExists(theFont,theCurrentPtSize) -- if can't find itthen put theCurrentPtSize into last item of missingend repeatif missing is not empty thenput theFont & space before missingput return after missingend ifreturn missingend checkHCFonton checkForMissingFonts-- Requires handler: checkHCFont-- check to see if the fonts needed for the stacks are-- installed in the system. Inform the user if they're not.get checkHCFont("Courier","10,12") & checkHCFont("Geneva","10,14") & ¬¨checkHCFont("Palatino","10,12,14,18,24") & ¬¨checkHCFont("Helvetica","18,24") -- these are fonts needed by this stackif it is empty then exit checkForMissingFontselse put it into missingFontsbeep 1-- ‚àÜ this dialog informs the user which fonts are missinganswer "These font(s) are missing from your system:" & ¬¨return & return & missingFonts & return & ¬¨"For text to display correctly in the stacks, make sure you have" ¬¨&& "installed the fonts included with HyperCard."end checkForMissingFonts</script>
  17.     <background id="2717" file="background_2717.xml" name="Home Cards" />
  18.     <background id="4099" file="background_4099.xml" name="Preferences" />
  19.     <background id="16078" file="background_16078.xml" name="paths" />
  20.     <card id="3916" file="card_3916.xml" marked="false" name="Welcome to..." owner="2717" />
  21.     <card id="16724" file="card_16724.xml" marked="false" name="Stack Kit" owner="2717" />
  22.     <card id="6749" file="card_6749.xml" marked="false" name="Card 3" owner="2717" />
  23.     <card id="5101" file="card_5101.xml" marked="false" name="Card 4" owner="2717" />
  24.     <card id="6978" file="card_6978.xml" marked="false" name="Card 5" owner="2717" />
  25.     <card id="2376" file="card_2376.xml" marked="false" name="Stacks" owner="16078" />
  26.     <card id="3517" file="card_3517.xml" marked="false" name="Applications" owner="16078" />
  27.     <card id="3090" file="card_3090.xml" marked="false" name="Documents" owner="16078" />
  28.     <card id="5698" file="card_5698.xml" marked="false" name="User Preferences" owner="4099" />
  29. </stack>
  30.